<%@ page language="java" import="java.util.*" import="java.sql.*"  pageEncoding="utf-8" import="java.util.Date" import="java.text.SimpleDateFormat"%>
<html>
 <body>
 <%@ include file="dengluPublic.jsp" %>
 <%!
 String cno;
  %> 
    <%
    request.setCharacterEncoding("utf-8");
    cno=request.getParameter("cno");            
     %>
     <%        
     String driverClass1="com.mysql.jdbc.Driver";
	    String url1="jdbc:mysql://localhost:3306/vote?useSSL=false";
	    String user1="root";
	    String password1="womenilu2580";		
	    Class.forName(driverClass1);
	    Connection conn1=DriverManager.getConnection(url1,user1,password1);	 
	    Statement stat1=conn1.createStatement();
	    String sql1="delete from friend where cname='"+customer.getCname()+"'and fno='"+cno+"'";
	  	stat1.executeUpdate(sql1);
	    	        	    
	    Class.forName(driverClass1);
	    Connection conn=DriverManager.getConnection(url1,user1,password1);
	    Statement stat2=conn.createStatement();	 
	    String sql2="delete from friend where cno='"+cno+"'and friend='"+customer.getCname()+"'";
	  	stat2.executeUpdate(sql2);	   
	  	System.out.println(customer.getCname()+","+cno+"我是删除页"); 
	   %> 
	   
  <%
  response.sendRedirect("customerPage.jsp");
   %>
    
  </body>
</html>
